package com.lizhaoshan.dao;

import com.lizhaoshan.pojo.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @program: reggie
 * @description: 新增分类数据库接口
 * @author: lamour
 * @create: 2022-05-13 20:41
 **/

@Mapper
public interface CategoryDao {

    public int addCategory(Category category);

    int updateCategory(Category category);

    int deleteCategory(String id);

    Category selectByNameCategory(Category category);


    /**
     * 通过type下拉列表查询
     * @return
     */
    List<Category> selectAllByType(Integer type);

    List<Category> selectPage(@Param("begin") Integer begin, @Param("pageSize")Integer pageSize);

    int pageCount(@Param("begin") Integer begin, @Param("size")Integer pageSize);

    Category selectById(String categoryId);
}
